<script setup>
// 获取文章列表
import {artGetChannelsService} from "@/api/article.js";
import { ref } from 'vue'

defineProps({
  modelValue:[String, Number],
  width: {
    type: String,
  }
})
// 文章分类 列表
const channelList = ref([
  {
    id:'1',
    cate_name:'小米王总被裁了'
  },
  {
    id:'2',
    cate_name:'小米王总被裁了'
  },
  {
    id:'3',
    cate_name:'小米王总被裁了'
  }
])
const getChannelList = async () => {
 const res =  await artGetChannelsService()
  console.log(res,'获取文章列表')
}
// getChannelList()
const emit = defineEmits(['update:modelValue'])
</script>

<template>
  <el-select :model-value="modelValue" @update:modelValue="emit('update:modelValue',$event)" :style="{ width }">
    <el-option v-for="item in channelList" :key="item.id" :label="item.cate_name" :value="item.id"></el-option>
  </el-select>
</template>

<style scoped>

</style>
